import request from '@/utils/request'

// 角色列表信息
export const getRoleList = (params) => request.get('/sys/role', { params })
// 添加
export const addRole = data => request.post('/sys/role', data)
// 编辑
export const editRole = data => request.put(`/sys/role/${data.id}`, data)
// 删除
export const delRole = id => request.delete(`/sys/role/${id}`)
// 获取已启用的角色列表
export const getAssignList = () => request.get('/sys/role/list/enabled')
// 分配权限
export const updateAssignRole = data => request.put('/sys/role/assignPrem', data)
// 获取角色详情
export const getRole = id => request.get(`/sys/role/${id}`)

